package com.example.emb.config;

import com.hankcs.hanlp.HanLP;
import com.hankcs.hanlp.seg.Segment;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class HanlpComfig {
    @Bean
    public Segment hanLP() {

        return HanLP.newSegment().enableNameRecognize(true)
                .enableAllNamedEntityRecognize(true)
                .enableCustomDictionary(true)
                .enableIndexMode(true)
                .enableCustomDictionaryForcing(true)
                .enableMultithreading(true)
                .enableNumberQuantifierRecognize(true)
                .enableOffset(true)
                .enableOrganizationRecognize(true)
                .enablePartOfSpeechTagging(true)
                .enablePlaceRecognize(true)
                .enableTranslatedNameRecognize(true);
    }

}
